package com.sc.nft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sc.nft.entity.EcologyPoolDaoRankConf;
import com.sc.nft.entity.dto.EcologyPoolCreateDaoRankConfIncomeDTO;
import com.sc.nft.entity.vo.ExcellentBrandRankingVO;
import com.sc.nft.entity.vo.ecologypool.EcologyPoolDaoRankConfDetailVO;
import com.sc.nft.entity.vo.ecologypool.EcologyPoolDaoRankConfVO;
import com.sc.nft.enums.EcologyPoolDaoRankTypeEnum;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author PC
 * @description 针对表【sc_ecology_pool_dao_rank_conf(生态池-品牌榜配置)】的数据库操作Service
 * @createDate 2024-07-16 19:05:30
 */
public interface EcologyPoolDaoRankConfService {


    /**
     * 获取正在活动中的榜单
     *
     * @return
     */
    List<EcologyPoolDaoRankConf> getActiveRankings();

    /**
     * 处理当前的所有开启的dao
     *
     * @param activeRanking
     */
    List<ExcellentBrandRankingVO> excellentBrandRanking(EcologyPoolDaoRankConf activeRanking);

    /**
     * 创建品牌榜
     *
     * @param rankName                               榜单名称
     * @param rankType                               榜单类型
     * @param userRatio                              用户系数
     * @param ecologyRatio                           熔炼系数
     * @param cashInRatio                            入金系数
     * @param contributionThreshold                  贡献值阈值
     * @param startTime                              开始时间
     * @param endTime                                结束时间
     * @param activityRule                           活动规则
     * @param ecologyPoolCreateDaoRankConfIncomeDTOS incomeList
     */
    void createDaoRankConf(String rankName, EcologyPoolDaoRankTypeEnum rankType, BigDecimal userRatio, BigDecimal ecologyRatio, BigDecimal cashInRatio, BigDecimal contributionThreshold, Date startTime, Date endTime, String activityRule, String topImage, List<EcologyPoolCreateDaoRankConfIncomeDTO> ecologyPoolCreateDaoRankConfIncomeDTOS);

    /**
     * 删除品牌榜
     *
     * @param id id
     */
    void deleteDaoRankConf(Long id);

    /**
     * 获取排行榜列表中关闭时间
     *
     * @return
     */
    Date getRankConfLastTime(EcologyPoolDaoRankTypeEnum ecologyPoolDaoRankTypeEnum);

    /**
     * 编辑品牌榜
     *
     * @param id           id
     * @param activityRule 规则图片
     */
    void updateDaoRankConf(Long id, String activityRule, String topImage);

    /**
     * 品牌榜上下架
     *
     * @param id     id
     * @param status 状态
     */
    void updateDaoRankConfStatus(Long id, Boolean status);

    /**
     * 品牌榜详情
     *
     * @param id id
     * @return EcologyPoolDaoRankConfDetailVO
     */
    EcologyPoolDaoRankConfDetailVO daoRankConfDetail(Long id);

    /**
     * 品牌榜查询 分页
     *
     * @param pageNo   pageNo
     * @param pageSize pageSize
     * @param rankName 名称
     * @return EcologyPoolDaoRankConfVO
     */
    IPage<EcologyPoolDaoRankConfVO> daoRankConfPage(int pageNo, int pageSize, String rankName);

}
